<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<div class="panel border-back" id="write_goods_info_div">
	<div class="panel-body">
		<div class="line-big">
			<div class="xl10 text-left">
				<button class="button border-blue" id="select_all_order_id">
					<span class="icon-star"></span> 全选
				</button>
				<button class="button border-blue" id="reverse_select_all_order_id">
					<span class="icon-star-half-empty"></span> 反选
				</button>
				<c:choose>
					<c:when test="${s=='待付款' }"></c:when>
					<c:when test="${s=='待发货' }">
						<!-- <button class=" button bg-red" id="batch_send_order">
							<span class="icon-send"></span> 批量确认派送
						</button> -->
						<!-- <button class=" button bg-red" id="batch_send_and_print_order_button">
							<span class="icon-send"></span> 批量确认派送&nbsp;并&nbsp;<span class="icon-print"></span> 打印订单
						</button> -->
					</c:when>
					<c:when test="${s=='待收货' }">
						<button class=" button bg-red" id="batch_receive_order">
							<span class="icon-check"></span> 确认送达
						</button>
						<!-- <button class=" button bg-red" id="batch_print_order">
							<span class="icon-send"></span> 批量打印订单
						</button> -->
					</c:when>
					<c:when test="${s=='交易完成' }">
						<!-- <button class=" button bg-red" id="batch_print_order">
							<span class="icon-send"></span> 批量打印订单
						</button> -->
					</c:when>
					<c:when test="${s=='交易取消' }"></c:when>
				</c:choose>
			</div>
			<div class="xl2 text-right">
				<div class="field field-icon-right" title="查找订单">
					<span class="icon icon-search" id="search_order_button"></span>
					<input type="text" class="input radius-rounded" id="keyword_of_order_input" value="${param.k }" placeholder="订单号、收货信息" />
				</div>

			</div>
		</div>

	</div>
	<div class="panel-foot bg-yellow-light border-back">
		<div class="line-big">
			<div class="xl4 text-center border-small border-right border-blue">商品信息</div>
			<div class="xl1 text-center border-small border-right border-blue">单价(元)</div>
			<div class="xl1 text-center border-small border-right border-blue">数量</div>
			<div class="xl2 text-center border-small border-right border-blue">付款(元)</div>
			<div class="xl2 text-center border-small border-right border-blue">交易状态</div>
			<div class="xl2 text-center">操作</div>
		</div>
	</div>
	<ul class="list-group list-striped">
		<c:forEach items="${complexOrderList }" var="co" varStatus="coStat">
			<li id="li_${co.order.orderId }">
				<div class="line-big">
					<div class="xl6 text-left">
						<input class="order_id_check_box" type="checkbox" data-id="${co.order.orderId }" data-li="#li_${co.order.orderId }">
						<strong class="margin-left"><span class="icon-clock-o"></span> <fmt:formatDate value="${co.order.orderBuyTime }" pattern="yyyy-MM-dd HH:mm" /> <span class="icon-file-text-o margin-left"></span>
							订单号：${co.order.orderId }</strong><span>(${co.order.operationMode })</span> <span><button class="button button-little bg-blue dialogs see_order_declaration_button" data-toggle="click"
								data-target="#see_order_declaration_detail" data-mask="1" data-width="960px" data-url="shop/show_order_declaration_detail?id=${co.order.orderId }">
								<span class="icon-eye"></span> 申报状态
							</button></span>
					</div>
					<div class="xl6 text-left">
						<strong><span class="glyphicon glyphicon-user"></span> 收货人：${co.order.orderBuyerName} ${co.order.orderBuyerPhone} ， <span class="glyphicon glyphicon-map-marker"></span> 派送至：${co.order.orderBuyerProvince}
							${co.order.orderBuyerCity} ${co.order.orderBuyerDistrict} ${co.order.orderBuyerAddress} (买家编号：${co.order.buyerId })</strong>
					</div>
				</div>
			</li>
			<li id="li_${co.order.orderId }_2">
				<div class="line-big">
					<div class="xl6 text-center">
						<c:forEach items="${co.goodsHistoryItemList}" var="goodsHistoryItem" varStatus="giStat">
							<div class="line-big">
								<div class="xl2 text-center">
									<img class="center-block img-responsive" style="max-height: 60px; max-width: 60px;" src="${goodsHistoryItem.goodsHistory.goodsMainPic }" />
								</div>
								<div class="xl6 text-center">
									<h5 class="text-left">
										<strong> <a href="javascript:void(0)">${goodsHistoryItem.goodsHistory.goodsName }</a>
										</strong>
									</h5>
									<h6 class="text-left G-MarginTop10">${goodsHistoryItem.goodsHistory.goodsTips}</h6>
									<h6 class="text-left G-MarginTop10">商品编号：${goodsHistoryItem.goodsHistory.goodsId}</h6>
									<h6 class="text-left G-MarginTop10">
										<c:if test="${co.order.orderStatus=='交易完成' }">
											<c:choose>
												<c:when test="${goodsHistoryItem.commentId!=null }">
													<button class="comment_goods_button button button-little bg-default" data-comment-id="${goodsHistoryItem.commentId }" data-goods-id="${goodsHistoryItem.goodsHistory.goodsId }"
														data-order-id="${co.order.orderId }" data-li="#li_${co.order.orderId }">
														<span class="icon-comment"></span> 查看/回复评论
													</button>
												</c:when>
												<c:otherwise>
												</c:otherwise>
											</c:choose>
										</c:if>
										<button class="see_snapshot_button dialogs button button-little bg-default" data-li="#li_${co.order.orderId }" data-toggle="click" data-target="#see_goods_history_dialog" data-mask="1" data-width="960px"
											data-url="${basePath }shop/show_goods_snapshot?commonStr=${goodsHistoryItem.goodsHistory.historyId }">
											<span class="icon-eye"></span> 交易快照
										</button>
									</h6>
								</div>
								<div class="xl2 text-center">
									<fmt:formatNumber value="${goodsHistoryItem.goodsHistory.goodsPrice }" type="currency" pattern="#,##0.##" />
								</div>
								<div class="xl2 text-center">${goodsHistoryItem.number }</div>
							</div>
							<c:if test="${fn:length(co.goodsHistoryItemList)!=giStat.count}">
								<hr class="">
							</c:if>
						</c:forEach>
					</div>
					<div class="xl2 text-center">
						<strong> <fmt:formatNumber value="${co.order.orderTotalPrice }" type="currency" pattern="#,##0.##" />
						</strong>
						<c:if test="${co.order.orderFreight>0 }">
							<span class="G-MarginLeft5">（邮费 <fmt:formatNumber value="${co.order.orderFreight }" type="currency" pattern="#,##0.##" /> 元） 
						</c:if>
						<c:if test="${co.order.orderFreight<=0 }">
							<span class="G-MarginLeft5">（卖家包邮）</span>
						</c:if>

						</span> <br> <br>
						<c:if test="${co.order.orderSendWay!=null&&co.order.orderSendWay!=''}">
							<h6 class="text-left G-MarginTop5">派送时间：${co.order.orderSendWay }</h6>
						</c:if>
						<c:if test="${co.order.orderBuyerPeopleId!=null&&co.order.orderBuyerPeopleId!=''}">
							<h6 class="text-left G-MarginTop5">身份证号：${co.order.orderBuyerPeopleId }</h6>
						</c:if>
						<c:if test="${co.order.orderBuyerRealName!=null&&co.order.orderBuyerRealName!=''}">
							<h6 class="text-left G-MarginTop5">真实姓名：${co.order.orderBuyerRealName }</h6>
						</c:if>
					</div>
					<div class="xl2 text-center">
						<c:choose>
							<c:when test="${co.order.orderStatus=='待付款' }">
								<span class="badge bg-blue">等待买家付款</span>
							</c:when>
							<c:when test="${co.order.orderStatus=='待发货' }">
								<span class="badge bg-blue">等待卖家发货</span>
							</c:when>
							<c:when test="${co.order.orderStatus=='待收货' }">
								<span class="badge bg-blue">等待买家收货</span>
								<div class="border border-blue G-MarginTop10">
									<span>快递公司：${co.order.orderExpressCompany }</span><br> <span>快递单号：${co.order.orderExpressNumber }</span>
									<a title="点击查看快递信息" target="_blank" class="bg-blue radius-circle text-little" href="http://www.kuaidi100.com/chaxun?com=${co.order.orderExpressCompany }&nu=${co.order.orderExpressNumber }">
										&nbsp;<span class="icon-eye text-little text-white"></span>&nbsp;
									</a>
								</div>
							</c:when>
							<c:when test="${co.order.orderStatus=='待评价' }">
								<span class="badge bg-blue">等待买家评价</span>
								<h6 class="border border-blue G-MarginTop5">
									<span>快递公司：${co.order.orderExpressCompany }</span><br> <span>快递单号：${co.order.orderExpressNumber }</span>
									<a title="点击查看快递信息" target="_blank" class="bg-blue radius-circle text-little" href="http://www.kuaidi100.com/chaxun?com=${co.order.orderExpressCompany }&nu=${co.order.orderExpressNumber }">
										&nbsp;<span class="icon-eye text-little text-white"></span>&nbsp;
									</a>
								</h6>
							</c:when>
							<c:when test="${co.order.orderStatus=='交易完成' }">
								<span class="badge bg-blue">交易完成</span>
								<h6 class="border border-blue G-MarginTop5">
									<span>快递公司：${co.order.orderExpressCompany }</span><br> <span>快递单号：${co.order.orderExpressNumber }</span>
									<a title="点击查看快递信息" target="_blank" class="bg-blue radius-circle text-little" href="http://www.kuaidi100.com/chaxun?com=${co.order.orderExpressCompany }&nu=${co.order.orderExpressNumber }">
										&nbsp;<span class="icon-eye text-little text-white"></span>&nbsp;
									</a>
								</h6>
							</c:when>
							<c:when test="${co.order.orderStatus=='交易取消' }">
								<span class="badge bg-blue">交易已被取消</span>
							</c:when>
						</c:choose>

						<c:if test="${co.order.orderPayTime!=null}">
							<h6 class="G-MarginTop5">
								付款时间：
								<fmt:formatDate value="${co.order.orderPayTime }" pattern="yyyy-MM-dd HH:mm" />
							</h6>
						</c:if>
						<c:if test="${co.order.orderSendTime!=null}">
							<h6 class="G-MarginTop5">
								发货时间：
								<fmt:formatDate value="${co.order.orderSendTime }" pattern="yyyy-MM-dd HH:mm" />
							</h6>
						</c:if>
						<c:if test="${co.order.orderReceiveTime!=null}">
							<h6 class="G-MarginTop5">
								确认收货：
								<fmt:formatDate value="${co.order.orderReceiveTime }" pattern="yyyy-MM-dd HH:mm" />
							</h6>
						</c:if>
						<c:if test="${co.order.orderCompleteTime!=null}">
							<h6 class="G-MarginTop5">
								订单完成：
								<fmt:formatDate value="${co.order.orderCompleteTime }" pattern="yyyy-MM-dd HH:mm" />
							</h6>
						</c:if>
					</div>
					<div class="xl2 text-center">
						<c:choose>
							<c:when test="${co.order.orderStatus=='待付款' }"></c:when>
							<c:when test="${co.order.orderStatus=='待发货' }">
								<button class="send_out_order_button button bg-blue" data-id="${co.order.orderId }" data-li="#li_${co.order.orderId }">
									<span class="icon-send"></span> 派送订单
								</button>
								<br />
								<%-- <button class="send_and_print_order_button button bg-red margin-top" data-id="${co.order.orderId }" data-li="#li_${co.order.orderId }">
									<span class="icon-send"></span> 确认派送&nbsp;并&nbsp;<span class="icon-print"></span> 打印订单
								</button> --%>
							</c:when>
							<c:when test="${co.order.orderStatus=='待收货' }">
								<c:if test="${co.order.orderPayWay=='货到付款' }">
									<button class="receive_order_button button bg-red" data-id="${co.order.orderId }" data-li="#li_${co.order.orderId }">
										<span class="icon-check"></span> 确认送达
									</button>
								</c:if>
								<%-- <button class="print_order_button button bg-blue margin-top" data-id="${co.order.orderId }" data-li="#li_${co.order.orderId }">
									<span class="icon-print"></span> 打印订单
								</button> --%>
							</c:when>
							<c:when test="${co.order.orderStatus=='交易完成' }">
								<%-- <button class="print_order_button button bg-blue margin-top" data-id="${co.order.orderId }" data-li="#li_${co.order.orderId }">
									<span class="icon-print"></span> 打印订单
								</button> --%>
							</c:when>
							<c:when test="${co.order.orderStatus=='交易取消' }"></c:when>
						</c:choose>
					</div>
				</div>
			</li>
		</c:forEach>
	</ul>
	<div class="panel-foot bg-white border-back" id="goods_list_pages" data-url="pages_button" data-index="${page.currentIndex}" data-pages="${page.totalPages}"
		data-href="shop/show_order_list?s=${param.s }&k=${param.k }&i="></div>
</div>

<div id="see_comment_dialog"></div>

<div id="see_goods_history_dialog"></div>
<div id="send_out_order_dialog" style="">
	<div class="dialog">
		<div class="dialog-head">
			<span class="close rotate-hover"></span> <strong>派送订单</strong>
		</div>
		<div class="dialog-body">
			<input type="hidden" id="express_order_id_input">
			<input type="hidden" id="order_div_li_input">
			<div class="form-group">
				<div class="label">
					<label for="orderExpressCompany">*快递公司名称(2-50个字)</label>
				</div>
				<div class="field">
					<input type="text" class="input" value="11" id="orderExpressCompany" data-regex="^\S.{0,48}\S$" />
				</div>
			</div>
			<div class="form-group">
				<div class="label">
					<label for="orderExpressNumber">*快递公司单号(2-50个字)</label>
				</div>
				<div class="field">
					<input type="text" class="input" value="" id="orderExpressNumber" />
				</div>
			</div>
		</div>
		<div class="dialog-foot">
			<button class="button dialog-close">取消</button>
			<button class="button bg-green" id="submit_send_out_order_button">确认</button>
		</div>
	</div>
</div>
<a id="a_link_for_data_href" target="_blank" href="">
	<span id="a_link_span_for_data_href"></span>
</a>
<div id="see_order_declaration_detail"></div>
<script type="text/javascript" src="${basePath }js/pintuer.js"></script>
<script type="text/javascript">
	$(function()
	{

		$(".comment_goods_button").each(function()
		{
			var button_obj = $(this);
			button_obj.click(function()
			{
				$("#admin_div").html("");
				$("#admin_div").load("shop/add_reply_for_comment",
				{
					id : button_obj.attr("data-comment-id"),
					temp : new Date()
				}, function()
				{

				});
			});
		});

		$(".send_out_order_button").each(function()
		{
			var button_obj = $(this);
			button_obj.click(function()
			{
				$("#admin_div").html("");
				$("#admin_div").load("shop/ajax/order/add_express_info.jsp",
				{
					id : button_obj.attr("data-id"),
					temp : new Date()
				}, function()
				{

				});
			});
		});

		$("body").on("click", "#submit_send_out_order_button", function()
		{
			var order_div_li = $("#order_div_li_input").val();

			var express_order_id_input = $("#express_order_id_input").val();

			alert($(document).find("#orderExpressCompany").val().length);
			var orderExpressCompany = $(document).find("#orderExpressCompany").val();
			var orderExpressNumber = $(document).find("#orderExpressNumber").val();

			if (express_order_id_input.length <= 0 || orderExpressCompany.length <= 0 || orderExpressNumber.length <= 0)
			{
				alert("标有*的输入项都是必填项.")
				return false;
			}

			var tips = "";
			var tips_number = 1;
			$("#orderExpressCompany,#orderExpressNumber").each(function(i, dom)
			{
				var n = $(dom);
				if (new RegExp(n.attr("data-regex")).test(n.val()) == false)
				{
					tips += tips_number++ + " . \"" + n.val() + "\" 不满足输入要求;\n";
				}
			});

			if (tips.length > 0)
			{
				alert(tips + "\n请检查一下重新输入.");
				return false;
			}

			var submit_send_out_order_button_html = $("#submit_send_out_order_button").html();
			$.ajax(
			{
				url : "admin/m_add_express_info_do",
				type : "POST",
				dataType : "json",
				beforeSend : function(XMLHttpRequest)
				{
					$("#submit_send_out_order_button").attr("disabled", "disabled");
					$("#submit_send_out_order_button").html("正在提交快递信息中...");
				},
				data :
				{
					'order.orderId' : express_order_id_input,
					'order.orderExpressCompany' : orderExpressCompany,
					'order.orderExpressNumber' : orderExpressNumber
				},
				success : function(json, textStatus)
				{
					if (json.success == true)
					{
						alert("派送订单成功");
					}
					else
					{
						alert(json.info);
					}
				},
				error : function(XMLHttpRequest, textStatus, errorThrown)
				{
					alert("提交失败，请仔细检查您的输入是否满足要求。");
				},
				complete : function(XMLHttpRequest, textStatus)
				{
					$("#submit_send_out_order_button").removeAttr("disabled");
					$("#submit_send_out_order_button").html(submit_send_out_order_button_html);
				}
			});

		});

		$("#select_all_order_id").click(function()
		{
			$(".order_id_check_box").attr("checked", true);
		});
		$("#reverse_select_all_order_id").click(function()
		{
			$(".order_id_check_box").each(function()
			{
				$(this).attr("checked", !this.checked);
			});
		});
		$("#batch_send_order").click(function()
		{
			var ids = "";
			var num = 0;
			$("input.order_id_check_box:checked").each(function()
			{
				ids += $(this).attr("data-id") + ",";
				num++;
			});
			if (ids.length <= 0)
			{
				alert("请先勾选需要操作的订单");
				return false;
			}
			ids = ids.substring(0, ids.length - 1);

			if (confirm("确认批量派送这 " + num + " 个订单吗?") == false)
			{
				return false;
			}

			$("#batch_send_order").attr("disabled", "disabled");
			$.post("shop/sp_send_order_do",
			{
				"commonStr" : ids
			}, function(json)
			{
				if (json.success == false)
				{
					alert(json.info);
					$("#batch_send_order").removeAttr("disabled");
				}
				else
				{
					$("#batch_send_order").removeAttr("disabled");
					$("input.order_id_check_box:checked").each(function()
					{
						$($(this).attr("data-li")).remove();
						$($(this).attr("data-li") + "_2").remove();
					});
				}
			},
			//返回类型
			"json");
		});
		$("#batch_send_and_print_order_button").click(function()
		{
			var ids = "";
			var num = 0;
			$("input.order_id_check_box:checked").each(function()
			{
				ids += $(this).attr("data-id") + ",";
				num++;
			});
			if (ids.length <= 0)
			{
				alert("请先勾选需要操作的订单");
				return false;
			}
			ids = ids.substring(0, ids.length - 1);

			if (confirm("确认批量派送这 " + num + " 个订单并打印吗?") == false)
			{
				return false;
			}

			$("#batch_send_order").attr("disabled", "disabled");
			$.post("shop/sp_send_order_do",
			{
				"commonStr" : ids
			}, function(json)
			{
				if (json.success == false)
				{
					alert(json.info);
					$("#batch_send_order").removeAttr("disabled");
				}
				else
				{
					$("#batch_send_order").removeAttr("disabled");
					$("#a_link_for_data_href").attr("href", "shop/shop_print_order?commonStr=" + ids);
					$("#a_link_span_for_data_href").click();
					$("input.order_id_check_box:checked").each(function()
					{
						$($(this).attr("data-li")).remove();
						$($(this).attr("data-li") + "_2").remove();
					});
				}
			},
			//返回类型
			"json");
		});
		$("#batch_print_order").click(function()
		{
			var ids = "";
			var num = 0;
			$("input.order_id_check_box:checked").each(function()
			{
				ids += $(this).attr("data-id") + ",";
				num++;
			});
			if (ids.length <= 0)
			{
				alert("请先勾选需要操作的订单");
				return false;
			}
			ids = ids.substring(0, ids.length - 1);

			if (confirm("确认批量打印这 " + num + " 个订单吗?") == false)
			{
				return false;
			}

			$("#a_link_for_data_href").attr("href", "shop/shop_print_order?commonStr=" + ids);
			$("#a_link_span_for_data_href").click();
		});
		$("#batch_receive_order").click(function()
		{
			var ids = "";
			var num = 0;
			$("input.order_id_check_box:checked").each(function()
			{
				ids += $(this).attr("data-id") + ",";
				num++;
			});
			if (ids.length <= 0)
			{
				alert("请先勾选需要操作的订单");
				return false;
			}
			ids = ids.substring(0, ids.length - 1);

			if (confirm("确认这 " + num + " 个订单已经送达了吗?") == false)
			{
				return false;
			}

			$("#batch_receive_order").attr("disabled", "disabled");
			$.post("shop/sp_receive_order_do",
			{
				"commonStr" : ids
			}, function(json)
			{
				if (json.success == false)
				{
					alert(json.info);
					$("#batch_receive_order").removeAttr("disabled");
				}
				else
				{
					$("#batch_receive_order").removeAttr("disabled");
					$("input.order_id_check_box:checked").each(function()
					{
						$($(this).attr("data-li")).remove();
						$($(this).attr("data-li") + "_2").remove();
					});
				}
			},
			//返回类型
			"json");
		});
		$(".send_order_button").each(function()
		{
			$(this).click(function()
			{
				if (confirm("确认派送此订单吗?") == false)
				{
					return false;
				}
				var ids = "";
				ids = $(this).attr("data-id");
				var obj = $(this);

				obj.attr("disabled", "disabled");
				$.post("shop/sp_send_order_do",
				{
					"commonStr" : ids
				}, function(json)
				{
					if (json.success == false)
					{
						alert(json.info);
						obj.removeAttr("disabled");
					}
					else
					{
						obj.removeAttr("disabled");
						$(obj.attr("data-li")).remove();
						$(obj.attr("data-li") + "_2").remove();
					}
				},
				//返回类型
				"json");
			});
		});
		$(".send_and_print_order_button").each(function()
		{
			$(this).click(function()
			{
				if (confirm("确认派送此订单并打印订单吗?") == false)
				{
					return false;
				}
				var ids = "";
				ids = $(this).attr("data-id");
				var obj = $(this);

				obj.attr("disabled", "disabled");
				$.post("shop/sp_send_order_do",
				{
					"commonStr" : ids
				}, function(json)
				{
					if (json.success == false)
					{
						alert(json.info);
						obj.removeAttr("disabled");
					}
					else
					{
						obj.removeAttr("disabled");
						$("#a_link_for_data_href").attr("href", "shop/shop_print_order?commonStr=" + ids);
						$("#a_link_span_for_data_href").click();
						$(obj.attr("data-li")).remove();
						$(obj.attr("data-li") + "_2").remove();
					}
				},
				//返回类型
				"json");
			});
		});
		$(".print_order_button").each(function()
		{
			$(this).click(function()
			{
				var ids = "";
				ids = $(this).attr("data-id");
				var obj = $(this);

				$("#a_link_for_data_href").attr("href", "shop/shop_print_order?commonStr=" + ids);
				$("#a_link_span_for_data_href").click();
			});
		});
		$(".receive_order_button").each(function()
		{
			$(this).click(function()
			{
				var ids = "";
				ids = $(this).attr("data-id");
				var obj = $(this);

				obj.attr("disabled", "disabled");
				$.post("shop/sp_receive_order_do",
				{
					"commonStr" : ids
				}, function(json)
				{
					if (json.success == false)
					{
						alert(json.info);
						obj.removeAttr("disabled");
					}
					else
					{
						obj.removeAttr("disabled");
						$(obj.attr("data-li")).remove();
						$(obj.attr("data-li") + "_2").remove();
					}
				},
				//返回类型
				"json");
			});
		});
		$("#goods_list_pages").load($("#goods_list_pages").attr("data-url"),
		{
			"page.currentIndex" : $("#goods_list_pages").attr("data-index"),
			"page.totalPages" : $("#goods_list_pages").attr("data-pages"),
			"page.href" : $("#goods_list_pages").attr("data-href")
		}, function()
		{
		});
		$("#goods_list_pages").on("click", "button[data-url]", function()
		{
			$("#admin_div").load(encodeURI($(this).attr("data-url")), {}, function()
			{
			});
		});

		$("#search_order_button").click(function()
		{
			var keyword = $("#keyword_of_order_input").val();
			if (keyword.length <= 0)
			{
				return false;
			}
			$("#admin_div").load(encodeURI("shop/show_order_list?s=${param.s}&k=" + keyword), {}, function()
			{
			});
		});
		$("#keyword_of_order_input").keydown(function(event)
		{
			if (event.keyCode == 13)
			{
				$("#search_order_button").trigger("click");
			}
		});
	});
</script>